﻿using System.Runtime.InteropServices;

namespace Storm.TextEditor.Win32.Structs
{
	[StructLayout(LayoutKind.Sequential)]
	public struct RECTAPI
	{
		public int Left;
		public int Top;
		public int Right;
		public int Bottom;

		public int Width
		{
			get { return Right - Left; }
		}

		public int Height
		{
			get { return Bottom - Top; }
		}

		/// <summary>
		/// Initializes a new instance of RECTAPI.
		/// </summary>
		public RECTAPI(int left, int top, int right, int bottom)
		{
			Left = left;
			Top = top;
			Right = right;
			Bottom = bottom;
		}
	}
}
